<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生信息管理</title>
    <link rel="stylesheet" href="/css/layui.css">
    <link rel="stylesheet" href="/css/dp01.css">
</head>
<body>
<div class="container">
    <div class="layui-row">
        <div class="layui-col-xs12">
            <h1 style="text-align: center">学生信息管理</h1>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-xs12 toolbar">
            <!-- 新增按钮 -->
            <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" onclick="showStudentDlg();">
                <i class="layui-icon">&#xe654;</i>
            </button>

            <!-- 删除按钮 -->
            <button type="button" class="layui-btn layui-btn-sm layui-btn-normal layui-bg-red" onclick="deleteConfirm();" style="float:right;">
                <i class="layui-icon layui-icon-delete"></i>
            </button>
        </div>
    </div>
    <div class="queryBox">
        <form action="" class="layui-form" id="queryForm">
            <ul class="query-inline">
                <li class="layui-input-group">
                    <div class="layui-input-prefix">学号</div>
                    <input type="text" placeholder="学号" class="layui-input" name="sno">
                </li>
                <li class="layui-input-group">
                    <div class="layui-input-prefix">姓名</div>
                    <input type="text" placeholder="姓名" class="layui-input" name="name">
                </li>
                <li class="layui-input-group">
                    <div class="layui-input-prefix">年龄</div>
                    <input type="number" placeholder="年龄" class="layui-input" name="age">
                </li>
                <li class="layui-input-group">
                    <div class="layui-input-prefix">性别</div>
                    <select name="sex">
                        <option value="">请选择</option>
                        <option value="1">男</option>
                        <option value="2">女</option>
                    </select>
                </li>
                <li class="layui-input-group">
                    <button type="button" class="layui-btn layui-btn-normal" onclick="search(); return false;">
                        查询
                    </button>
                </li>
            </ul>
        </form>
    </div>
    <div class="layui-row">
        <div class="layui-col-xs12">
            <!-- 表格 -->
            <table id="studentTable" lay-filter="studentTable"></table>
            <!-- 操作列的模板 -->
            <script type="text/html" id="editTemplate">
                <a href="#" lay-event="edit" class="layui-btn layui-btn-normal layui-btn-xs">编辑</a>
            </script>
        </div>
    </div>
</div>

<!-- 表单内容 -->
<form class="layui-form" id="studForm" lay-filter="studForm" style="display: none;">
    <div class="layui-form-item">
        <label class="layui-form-label">学号</label>
        <div class="layui-input-block">
            <input type="text" name="sno" required lay-verify="required" placeholder="请输入学号" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-block">
            <input type="text" name="name" required lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
            <input type="radio" name="sex" value="1" title="男" checked>
            <input type="radio" name="sex" value="2" title="女">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">年龄</label>
        <div class="layui-input-block">
            <input type="text" name="age" required lay-verify="number" placeholder="请输入年龄" autocomplete="off" class="layui-input">
        </div>
    </div>
</form>

<script src="/js/jquery-3.7.1.min.js"></script>
<script src="/js/layui.js"></script>
<script src="/pagejs/dp01.js"></script>
</body>
</html>